package com.fjd.service;

import com.fjd.dto.OrderAddressEditDTO;
import com.fjd.dto.OrderDTO;
import com.fjd.dto.OrderSubmitDTO;
import com.fjd.dto.OrdersPaymentDTO;
import com.fjd.entity.DeliveryDetailHistory;
import com.fjd.vo.AddressVO;
import com.fjd.vo.GoodVO;
import com.fjd.vo.OrderPaymentVO;
import com.fjd.vo.OrderVO;

import java.util.List;

public interface OrderService {
    /**
     * 查询当前用户相关订单
     * @return
     */
    List<OrderVO> list(OrderDTO orderDTO);

    OrderVO select(String orderId);

    AddressVO getOrderAddr(String addressId);

    List<GoodVO> submit(List<OrderSubmitDTO> orderSubmitDTOList);

    void cancelOrder(String orderId);

    void editAddress(OrderAddressEditDTO orderAddressEditDTO);

    List<GoodVO> again(String orderId);

    OrderVO detail(String orderId);

    void deleteOrder(String orderId);

    void confirmOrder(String orderId);


    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * 查询物流详细信息
     * @param orderId
     * @return
     */
    List<DeliveryDetailHistory> deliverydetail(String orderId);

    /**
     * 支付订单（仅演示用）
     * @param orderId
     */
    void payorder(String orderId);
}
